/**
 * @file solverTest.cpp
 * @author luozi
 * @brief This file is using to test class solver
 * @version 0.1
 * @date 2024-06-06
 * 
 * @copyright Copyright (c) 2024 luozi
 * 
 */
#include "solver.h"
#include <iostream>
#include <vector>
#include <tuple>

int main(){
    std::vector<std::tuple<double, double, double>> testData = {
        std::tuple<double, double, double>(1, -3, 2), 
        std::tuple<double, double, double>(2, 5, 2),
        std::tuple<double, double, double>(0, 2, 1),
        std::tuple<double, double, double>(1, 0, -4),
        std::tuple<double, double, double>(1, 2, 1),
        std::tuple<double, double, double>(1, -2, -3),
        std::tuple<double, double, double>(1, 0, 1)
    };
    for (auto data : testData){
        auto returnString = Solver::solve2d(std::get<0>(data), std::get<1>(data), std::get<2>(data));
        std::cout << "Testing: "
            << "a = " << std::to_string(std::get<0>(data)) << ", "
            << "b = " << std::to_string(std::get<1>(data)) << ", "
            << "c = " << std::to_string(std::get<2>(data)) << ", "
            << "the result is:" << returnString << std::endl;
    }
    return 0;
}